{require_otp_vsn, "20.*"}.

{erl_opts, [
    warn_deprecated_function,
    warn_export_all,
    warn_export_vars,
    warn_obsolete_guard,
    warn_shadow_vars,
    warn_unused_function,
    warn_unused_import,
    warn_unused_record,
    warn_unused_vars,

    nowarnings_as_errors
    %warnings_as_errors
]}.

{xref_warnings, true}.
{xref_checks, [
               undefined_function_calls,
               undefined_functions,
               locals_not_used,
               % exports_not_used,
               deprecated_function_calls,
               deprecated_functions
              ]}.

{dialyzer, [
        %% Store PLT locally inside the project in .rebar (Default)
        %% {plt_location, local},
        %% Store PLT in custom directory
        %% {plt_location, "custom_dir"},
        {warnings, [unmatched_returns, error_handling, unknown]},
        {base_plt_apps, [erts, kernel, stdlib, syntax_tools, tools, xmerl, inets]}
    ]}.

{plugins, [coveralls]}.
{cover_enabled         , true}.
{cover_export_enabled  , true}.
{cover_print_enable    , true}.
{coveralls_coverdata   , "_build/test/cover/eunit.coverdata"}.
{coveralls_service_name, "travis-ci"}.

{escript_main_app, erlang_ls}.
{escript_comment, "%% v0.3.0\n"}.
{escript_emu_args, "%%! -noinput"}. % this is for open_port in jsonrpc.erl to work

{provider_hooks, [{post, [{compile, escriptize}]}]}.